Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum


PreviousPrevious NextNext

RE: Put some attachments into a notes document by Lotus Script
~Tate Quetgerobergakoi 8.Jan.04 02:28 PM a Web browser
Applications Development 6.0.1 CF2 Windows 2000

Use the Dir method to return an array of all the files in a given directory - your filespec argument can limit the returns to just the extension(s) you want to use.

==========From Designer Help=============
Returns file or directory names from a specified directory, or returns a drive volume label.
Dir[$] [ ( fileSpec [ , attributeMask ] ) ]
A string expression that specifies a path and the file names you want returned. The argument is required only for the first call to Dir$ for any path.
Standard wildcard characters can be used in fileSpec to designate all files satisfying the wildcard criterion. Asterisk ( * ) for either the file name or the extension designates all files with any characters in that position. Question mark ( ? ) in any character position in either part of the name designates any single character in that position.
An integer expression whose value specifies what names should be returned. If this argument is omitted, the names of normal files that match fileSpec are returned. If you supply an attributeMask argument, you must supply a fileSpec argument.
Dir$ always returns the names of normal files. To include other files in the returned list of file names, specify the sum of those values in the following table that correspond to the desired kinds of files:
Mask File attribute Constant
0 Normal file ATTR_NORMAL
2 Hidden file ATTR_HIDDEN
4 System file ATTR_SYSTEM
8 Volume label ATTR_VOLUME. If any other attribute is specified, ATTR_VOLUME is ignored.
Return value
Dir returns a Variant of DataType 8 (String), and Dir$ returns a String.
Note On any platform except Windows (16, 9x, NT, 2000) if you ask for just the volume label you will get an empty string.
The constants in the table are defined in the file lsconst.lss. Including this file in your script allows you to use constant names instead of their numeric values.
To determine whether a particular file exists, use an exact file name for the file_spec argument to Dir or Dir$. The return value is either the file name or, if the file does not exist, the empty string ("").
The first call to Dir or Dir$ returns the name of the first file in the specified directory that fits the file name specifications in the fileSpec argument. Then:
Subsequent calls to Dir or Dir$ without an argument retrieve additional file names that match fileSpec. You can call the Dir function with no arguments as either Dir or Dir( ). You can call the Dir$ function with no arguments as either Dir$ or Dir$().
If there are no more file names in the specified directory that match the specification, Dir returns a Variant of DataType 8 (String); Dir$ returns the empty string ("").
If Dir or Dir$ is called without an argument after the empty string has been returned, LotusScript generates an error.
The Dir or Dir$ function may not be called recursively.

Put some attachments into a notes d... (~George Xannupu... 8.Jan.04)
. . RE: Put some attachments into a not... (~Tate Quetgerob... 8.Jan.04)

Document Options

  Document options
Print this pagePrint this page

Search this forum

Forum views and search

  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Advanced search

Member Tools

RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS